wait_fix
authorAlastair McKinstry <mckinstry@debian.org>
Mon, 12 Sep 2016 06:54:45 +0000 (06:54 +0000)
committerAlastair McKinstry <mckinstry@debian.org>
Mon, 12 Sep 2016 06:54:45 +0000 (06:54 +0000)
commit3e77638e87f70366d72e07d394cd90b71e7c5fac
treea47c63fd3f8246c4a1ec303fc8c6130e948979d8
parent56f13433ced3f48d1decd373893b0857bdb15ffd
wait_fix

From f807f1e7e6e54209be06997ab1d1dd2f919f99a7 Mon Sep 17 00:00:00 2001
From: Gilles Gouaillardet <gilles@rist.or.jp>
Date: Wed, 7 Sep 2016 08:49:20 +0900
Subject: [PATCH] threads: fix WAIT_SYNC_INIT with a zero count

WAIT_SYNC_INIT(sync,0); WAIT_SYNC_RELEASE(sync);
hanged because sync->signaled was initialised to true, and
there is no reason to invoke WAIT_SYNC_SIGNALED(sync) before
WAIT_SYNC_RELEASE(sync)
this commit initializes sync->signaled to true unless the count is zero.

Thanks George for the review and guidance.

(cherry picked from commit open-mpi/ompi@44a66e208c5771e0897bcf27430a3afa171ba4c2)

Gbp-Pq: Name wait_fix.patch
opal/threads/wait_sync.h